package com.elminster.entity.base;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * Catalog entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "catalog", catalog = "test")
public class Catalog implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 6768824509384898784L;
    
    // Fields
    private Integer id;
    private String name;

    // Constructors
    /** default constructor */
    public Catalog() {
    }

    /** full constructor */
    public Catalog(String name) {
        this.name = name;
    }

    // Property accessors
    @Id
    @GeneratedValue
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(name = "name", nullable = false)
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String toString() {
        return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
    }
}